Validate Required Parameters

Now that you’re authenticated, let’s validate the required parameters to make sure they match the values configured on the server. In this example, we will use Innovative’s sandbox server and corresponding parameter test data given above in Table 2. If you are using the library’s training server, you will need to use values for the parameters that were supplied by the library and recorded in Table 3.

Once you receive a successful response ensuring that the values for login, location, fund, and vendor, are valid, you don’t have to make any subsequent calls to this endpoint to create orders. It’s only used once to validate the most critical order parameters.

In the Acquisitions section of the Swagger documentation on the sandbox, find the POST /v3/acquisitions/orders/validate endpoint and perform the following steps:

  1. Construct an HTTP body by copying/pasting or typing the HTTP body (below) into Swagger for this endpoint. Be sure to enter the login, location, and codes that were assigned to you. A generic example is shown below:

    Copy/Paste
    HTTP Body

    {

    "login": "acqstaff1",

    "copies": 4,

    "allocation": [

    {

    "location": "00",

    "fund": "acfic"

    },

    {

    "location": "00aca",

    "fund": "acnf"

    },

    {

    "location": "00ar",

    "fund": "jcpb"

    }

    ],

    "vendor": "vend1"

    }

  2. Select Try it now.

    Here are the example success and error responses that you may receive:

    Success Response

    Success – HTTP Response Code 204

    If successful, move on to Copies Parameter Explained.

    Error Response

    Error – HTTP Response Code other than 204. For example:

    {

    "code": 108,

    "specificCode": 0,

    "httpStatus": 400,

    "name": "Invalid parameter",

    "description": "Invalid parameter: fund code: 030eb not valid for login: acqstaff1"

    }

     

    Response code 400

    If you receive an error before proceeding, ensure that the values for login, location, fund, and vendor match what’s configured within Sierra and that you receive a successful HTTP 204 response.